import axios from "./axios"
let userId = 'clijobpca0002viheuhwcg9pn'
// let userId = 'cloc8yqmk0000vicz8dm7atxg'

export default {

  // 用户模块
  getUserList: params => axios.get(`/user/${userId}`, {params}),
  addUser: params => axios.post('/user', params),
  editUser: params => axios.put('/user', params),
  delUser: params => axios.delete('/user', {params}),
  updateResume: params => axios.post('/update/web'),

  // 用户信息模块
  getUserInfo: params => axios.get(`/user/info/${userId}`, {params}),
  setUserInfo: params => axios.put(`/user/info/${userId}`, params),

  // 博客
  getBlogList: params => axios.get(`/blog/${userId}`, {params}),
  addBlog: params => axios.post(`/blog/${userId}`, params),
  editBlog: params => axios.put(`/blog`, params),
  delBlog: params => axios.delete(`/blog`, {params}),

  // 技术列表
  getTechnical: params => axios.get(`/stack/${userId}`, {params}),
  addTechnical: params => axios.post(`/stack/${userId}`, params),
  editTechnical: params => axios.put(`/stack/${userId}`, params),
  delTechnical: params => axios.delete(`/stack`, {params}),

  // 开发方向+拓展能力
  getDirection: params => axios.get(`/wheel/${userId}`, {params}),
  addDirection: params => axios.post(`/wheel/${userId}`, params),
  delDirection: params => axios.delete(`/wheel`, {params}),

  // 工作历程
  getWorkHistory: params => axios.get(`/work/${userId}`, {params}),
  addWorkHistory: params => axios.post(`/work/${userId}`, params),
  editWorkHistory: params => axios.put(`/work`, params),
  delWorkHistory: params => axios.delete(`/work`, {params}),
  delSkill: params => axios.delete(`/work/skill`, {params}),

  // 核心项目
  getCoreProject: params => axios.get(`/core/${userId}`, {params}),
  addCoreProject: params => axios.post(`/core/${userId}`, params),
  editCoreProject: params => axios.put(`/core`, params),
  delCoreProject: params => axios.delete(`/core`, {params}),
  delCoreField: params => axios.delete(`/core/field`, {params}),

  // 网站项目
  getSiteProject: params => axios.get(`/site/${userId}`, {params}),
  addSiteProject: params => axios.post(`/site/${userId}`, params),
  editSiteProject: params => axios.put(`/site`, params),
  delSiteProject: params => axios.delete(`/site`, {params}),

  // 照片墙
  getPhoto: params => axios.get(`/photo/${userId}`, {params}),
  addPhoto: params => axios.post(`/photo/${userId}`, params),
  delPhoto: params => axios.delete(`/photo`, {params}),

}
